package com.artezio.buyndrive.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

@Embeddable
 //Составной ключ(мадификация, запчасть) в таблице applicability_parts
public class ApplicabilityPartsPK implements Serializable {
    
    //id модификации
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_car_modification")
    private Long idCarModification;
    
    //id запчасти
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_parts")
    private Long idParts;

    public ApplicabilityPartsPK() {
    }

    public ApplicabilityPartsPK(Long idCarModification, Long idParts) {
        this.idCarModification = idCarModification;
        this.idParts = idParts;
    }

    public Long getIdCarModification() {
        return idCarModification;
    }

    public void setIdCarModification(Long idCarModification) {
        this.idCarModification = idCarModification;
    }

    public Long getIdParts() {
        return idParts;
    }

    public void setIdParts(Long idParts) {
        this.idParts = idParts;
    }
}
